package com.daervin.svc.common.exception;

/**
 * Created by daervin on 2023/8/18
 */
public enum ErrorCode {
    SUCCESS(200, "success"),
    ERROR_PARAM(100, "参数异常"),
    PRODUCT_NOT_FOUND(101, "找不到商品"),
    STOCK_NOT_ENOUGH(102, "库存不足"),
    SYSTEM_ERROR(103, "系统开小差了~"),
    LOGIN_ERROR(104, "登录失败~"),
    LOGIN_EXPIRE(105, "登录已过期~"),
    ;

    public Integer code;
    public String message;

    ErrorCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
